<template>
	<view>
		<view class="width100vw height950 ibgFEC4CF-ffffff flex-ju-c flex-col center size28">
			<image mode="widthFix" src="/static/imgkefu.png" class="width315"></image>
			<view>
				<view class="bold mt30">我的客服</view>
				<view class="color666 mt5">Help Center</view>
			</view>
		</view>

		<button open-type="contact">
			<view class="flex-ju-c">
				<view class="wh600-100 flex-ju-c ra20 colorfff bg000">
					点击联系客服
				</view>
			</view>
		</button>

		<!-- <wx-open-launch-weapp env-version="develop" id="launch-btn" appid="wx10c4d8ca1b3fb62c" path="/pages/zixun/index"
			class="wh600-100 flex-ju-c ra20 colorfff bg000">前往小程序
			<component :is="'script'" type='text/wxtag-template'>
				<div
					style="border: 2rpx solid rgb(73, 162, 238); border-radius: 34rpx; color: rgb(73, 162, 238); padding: 10rpx; text-align: center;">
					前往小程序
				</div>
			</component>
		</wx-open-launch-weapp> -->
		
		
		<wx-open-launch-weapp 
		  id="launch-btn"
		  appid="wx10c4d8ca1b3fb62c"
		  path="/pages/zixun/index"
		>
		  <component :is="'script'" type="text/wxtag-template">
		    <style>
		      .btn {
		        display: block !important;
		        width: 100%;
		        height: 40px;
		        background-color: #07c160;
		        color: white;
		        border: none;
		      }
		    </style>
		    <button class="btn">打开小程序</button>
		  </component>
		</wx-open-launch-weapp>




	</view>

	 

</template>

<script>
	import jweixin from 'weixin-js-sdk';
	console.log(jweixin)

	// var btn = document.getElementById('launch-btn');
	// btn.addEventListener('launch', function(e) {
	// 	console.log('success');
	// });
	// btn.addEventListener('error', function(e) {
	// 	console.log('fail', e.detail);
	// });

	export default {
		data() {
			return {

			}
		},
		mounted() {

			this.http('/api/wxConfig', {
				url: "/pages/zixun/index"
			}, 'post').then(res => {
				jweixin.config({
					debug: true,
					appId: 'wx42760a0d04d49112',
					timestamp: res.data.timestamp,
					nonceStr: res.data.noncestr,
					signature: res.data.signature,
					jsApiList: ['openLocation', 'getLocation'],
					openTagList: ['wx-open-launch-weapp']
				})
			})

		},
		onLoad() {


		},
		methods: {
			tapc() {

			},

		}
	}
</script>

<style>
/* 	uni-button:after {
		border: none;
		background: none;
	}

	button::after {
		border: none;
		background: none;
	}

	button {
		border: none;
		background: none;
	}

	.butf {
		border: none;
		background: none;
	} */
</style>